#ifndef __TIME_H__
#define __TIME_H__

#include "types.h"

class TimeTicks
{
public:
	TimeTicks(uint64 tick);

	bool operator<(TimeTicks& others);
	bool operator>(TimeTicks& others);
	bool operator<=(TimeTicks& others);
	bool operator>=(TimeTicks& others);
	TimeTicks operator+(uint64 tick);
	TimeTicks operator-(uint64 tick);
	TimeTicks operator+(TimeTicks& tick);
	TimeTicks operator-(TimeTicks& tick);

	uint64 getTick();
private:
	uint64 m_ticks;
};

class Time
{
public:
	Time();
	~Time();

	static bool highResTime(bool open);
	static bool isHighResTime();
	static TimeTicks now();
	
private:
	static uint32 m_tickLastUsed; // tick from system start
	static bool high_res_time_;
};

#endif // __TIME_H__